package org.jsola.hr.web;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.jsola.core.Page;
import org.jsola.core.Result;
import org.jsola.hr.dto.WeekdaysAddDTO;
import org.jsola.hr.dto.WeekdaysUpdateDTO;
import org.jsola.hr.query.WeekdaysQuery;
import org.jsola.hr.vo.WeekdaysListVO;
import org.jsola.hr.vo.WeekdaysVO;

import java.util.Date;
import java.util.List;

/**
 * 工作日历表
 *
 * @author zhr
 */
@Api(tags = "hr-工作日历表")
public interface IWeekdaysControllerAPI {

    /**
     * 新增工作日历表
     *
     * @param weekdaysAddDTO 工作日历表新增实体
     * @return 工作日历表展示对象
     */
    @ApiOperation(value = "新增工作日历表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "weekdaysAddDTO", dataType = "WeekdaysAddDTO", value = "新增工作日历表", paramType = "body")
    })
    Result<WeekdaysVO> save(WeekdaysAddDTO weekdaysAddDTO);


    /**
     * 修改工作日历表
     *
     * @param weekdaysUpdateDTO 工作日历表
     * @return 更新数量
     */
    @ApiOperation(value = "修改工作日历表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "weekdaysUpdateDTO", dataType = "WeekdaysUpdateDTO", value = "修改工作日历表", paramType = "body")
    })
    Result<Integer> update(WeekdaysUpdateDTO weekdaysUpdateDTO);


    /**
     * 删除单个工作日历表，彻底删除
     *
     * @param weekdaysId 工作日历表id
     * @return 删除数量
     */
    @ApiOperation(value = "删除单个工作日历表，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "weekdaysId", dataType = "String", value = "工作日历表id", paramType = "path")
    })
    Result<Integer> delete(String weekdaysId);


    /**
     * 批量删除工作日历表，彻底删除
     *
     * @param weekdaysIds 工作日历表id集合
     * @return 删除数量
     */
    @ApiOperation(value = "批量删除工作日历表，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "weekdaysIds", dataType = "String[]", value = "工作日历表id数组", paramType = "body", allowMultiple = true)
    })
    Result<Integer> deleteBatch(String[] weekdaysIds);


    /**
     * 根据工作日历表id查询工作日历表详情
     *
     * @param weekdaysId 工作日历表id
     * @return 工作日历表详情
     */
    @ApiOperation(value = "根据工作日历表id查询工作日历表详情")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "weekdaysId", dataType = "String", value = "工作日历表id", paramType = "path")
    })
    Result<WeekdaysVO> findById(String weekdaysId);


    /**
     * 查询工作日历表
     *
     * @param weekdaysQuery 工作日历表查询参数
     * @return page
     */
    @ApiOperation(value = "查询工作日历表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "weekdaysQuery", dataType = "WeekdaysQuery", value = "工作日历表查询参数", paramType = "query")
    })
    Result<List<WeekdaysListVO>> listAll(WeekdaysQuery weekdaysQuery);


    /**
     * 分页查询工作日历表
     *
     * @param weekdaysQuery 工作日历表查询参数
     * @return page
     */
    @ApiOperation(value = "分页查询工作日历表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "weekdaysQuery", dataType = "WeekdaysQuery", value = "工作日历表查询参数", paramType = "query")
    })
    Result<Page<WeekdaysListVO>> page(WeekdaysQuery weekdaysQuery);

    /**
     * 查询总工作日
     *
     * @param startTime 开始时间
     * @param endTime   结束时间
     * @return page
     */
    @ApiOperation(value = "查询总工作日")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "startTime", dataType = "Date", value = "开始时间", paramType = "query"),
            @ApiImplicitParam(name = "endTime", dataType = "Date", value = "结束时间", paramType = "query")
    })
    Result<Integer> workdayListIncludeEndDate(Date startTime, Date endTime);
}

